javascript
if (window.confirm("Are you sure you want to continue?")) {  
    // 用户点击了“确定”  
    console.log("User confirmed.");  
} else {  
    // 用户点击了“取消”或关闭了对话框  
    console.log("User cancelled.");  
}
